package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the CALCLUATERULE database table.
 * 
 */
@Entity
@NamedQuery(name="Calcluaterule.findAll", query="SELECT c FROM Calcluaterule c")
public class Calcluaterule implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="CALCLUATERULE_CALCLUATERULEID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CALCLUATERULE_CALCLUATERULEID_GENERATOR")
	@Column(name="CALCLUATERULE_ID")
	private long calcluateruleId;

	@Column(name="CALCLUATERULE_CJDATE")
	private Timestamp calcluateruleCjdate;

	@Column(name="CALCLUATERULE_COUNT")
	private String calcluateruleCount;

	@Column(name="CALCLUATERULE_NAME")
	private String calcluateruleName;

	@Column(name="CALCLUATERULE_PERSON")
	private String calcluaterulePerson;

	@Column(name="CALCLUATERULE_REMARKS")
	private String calcluateruleRemarks;

	@Column(name="CALCLUATERULE_SJ")
	private BigDecimal calcluateruleSj;

	@Column(name="CALCLUATERULE_STATE")
	private BigDecimal calcluateruleState;

	@Column(name="CALCLUATERULE_UPDATETIME")
	private Timestamp calcluateruleUpdatetime;

	//bi-directional many-to-one association to Kaoqinrule
	@OneToMany(mappedBy="calcluaterule")
	@JSONField(serialize=false)
	private List<Kaoqinrule> kaoqinrules;

	public Calcluaterule() {
	}

	public long getCalcluateruleId() {
		return this.calcluateruleId;
	}

	public void setCalcluateruleId(long calcluateruleId) {
		this.calcluateruleId = calcluateruleId;
	}

	public Timestamp getCalcluateruleCjdate() {
		return this.calcluateruleCjdate;
	}

	public void setCalcluateruleCjdate(Timestamp calcluateruleCjdate) {
		this.calcluateruleCjdate = calcluateruleCjdate;
	}

	public String getCalcluateruleCount() {
		return this.calcluateruleCount;
	}

	public void setCalcluateruleCount(String calcluateruleCount) {
		this.calcluateruleCount = calcluateruleCount;
	}

	public String getCalcluateruleName() {
		return this.calcluateruleName;
	}

	public void setCalcluateruleName(String calcluateruleName) {
		this.calcluateruleName = calcluateruleName;
	}

	public String getCalcluaterulePerson() {
		return this.calcluaterulePerson;
	}

	public void setCalcluaterulePerson(String calcluaterulePerson) {
		this.calcluaterulePerson = calcluaterulePerson;
	}

	public String getCalcluateruleRemarks() {
		return this.calcluateruleRemarks;
	}

	public void setCalcluateruleRemarks(String calcluateruleRemarks) {
		this.calcluateruleRemarks = calcluateruleRemarks;
	}

	public BigDecimal getCalcluateruleSj() {
		return this.calcluateruleSj;
	}

	public void setCalcluateruleSj(BigDecimal calcluateruleSj) {
		this.calcluateruleSj = calcluateruleSj;
	}

	public BigDecimal getCalcluateruleState() {
		return this.calcluateruleState;
	}

	public void setCalcluateruleState(BigDecimal calcluateruleState) {
		this.calcluateruleState = calcluateruleState;
	}

	public Timestamp getCalcluateruleUpdatetime() {
		return this.calcluateruleUpdatetime;
	}

	public void setCalcluateruleUpdatetime(Timestamp calcluateruleUpdatetime) {
		this.calcluateruleUpdatetime = calcluateruleUpdatetime;
	}

	public List<Kaoqinrule> getKaoqinrules() {
		return this.kaoqinrules;
	}

	public void setKaoqinrules(List<Kaoqinrule> kaoqinrules) {
		this.kaoqinrules = kaoqinrules;
	}

	public Kaoqinrule addKaoqinrule(Kaoqinrule kaoqinrule) {
		getKaoqinrules().add(kaoqinrule);
		kaoqinrule.setCalcluaterule(this);

		return kaoqinrule;
	}

	public Kaoqinrule removeKaoqinrule(Kaoqinrule kaoqinrule) {
		getKaoqinrules().remove(kaoqinrule);
		kaoqinrule.setCalcluaterule(null);

		return kaoqinrule;
	}

}